//
//  ListView.swift
//  swiftStudy
//
//  Created by ext.zhangjunfei on 2021/7/13.
//

import SwiftUI

struct Data: Identifiable {
    var id = UUID()
    var item:String
}

struct ListView: View {
    
    var datas:Array<Data>
    
    init() {
        datas = []
        
        for i in 1...100{
            datas.append(Data(item: "第\(i)条item数据"))
        }
    }
    
    
    
    var body: some View {
        
        List(datas){data in
            CommonTextView(content: data.item)
        }
    }
}

struct ListView_Previews: PreviewProvider {
    static var previews: some View {
        ListView()
    }
}
